package chapter04.EXAMPle24;

public class EXAMPle24 {
    public static void main(String[] args){
        try {
            int result = divide(4,0);
            System.out.println(result);
        }catch (Exception e){
//            System.out.println( e.getMessage());
//           e.printStackTrace();
        }finally {
//            无论你有没有异常都执行
            System.out.println("释放一些资源");
        }

    }
    public static int divide(int x,int y){
        int result = x/y;
        return result;
    }
}
